package com.leo;

import com.jfoenix.controls.JFXRippler;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.stage.Stage;

import java.net.URL;

/**
 * @ClassName Main
 * @Description
 * @Author wangss
 * @date 2020.11.26 10:19
 * @Version 1.0
 */
public class JFXRipplerDemo extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws Exception {

        Label label = new Label("TEST");
        label.setStyle("-fx-background-color:WHITE;-fx-padding:20");
        JFXRippler rippler = new JFXRippler(label);
        rippler.getStyleClass().add("custom-jfx-rippler");

        Scene scene = new Scene(rippler);
        URL url = this.getClass().getResource("/css/myStyle.css");
        scene.getStylesheets().add(url.toExternalForm());
        primaryStage.setScene(scene);
        primaryStage.setWidth(800);
        primaryStage.setHeight(650);
        primaryStage.setTitle("JFoeniX测试");
        primaryStage.show();
    }
}
